package com.cloudeye.bus.model;

import lombok.Data;

/**
 * Created by lafangyuan on 2020/12/23.
 */
@Data
public class Result {

    private int code;

    private String msg;

    private Object data;

    public Result(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static Result sussess() {
        return new Result(0, "success", null);
    }

    public static Result sussess(Object data) {
        return new Result(0, "success", data);
    }

    public static Result fail(int code, String msg) {
        return new Result(code, msg, null);
    }
}
